﻿#ifndef _THREAD_MUTEX_H_
#define _THREAD_MUTEX_H_

#if defined(__cplusplus)
extern "C" {
#endif

#include <pthread.h>

int mutex_create(char* errStr, pthread_mutex_t* mtx);

int mutex_destroy(char* errStr, pthread_mutex_t* mtx);

int mutex_lock(char* errStr, pthread_mutex_t* mtx);

int mutex_unlock(char* errStr, pthread_mutex_t* mtx);

#if defined(__cplusplus)
}
#endif

#endif /* _THREAD_MUTEX_H_ */